<?php
namespace App\JdService;
/**
 * Created by PhpStorm.
 * User: laodage
 * Date: 19-1-14
 * Time: 下午3:39
 */
class jdPush {

    public function run($datas){
        //var_dump($data);exit();
        $json = $datas['jd_param_json'];
        $data = json_decode($json,true);
        if(empty($data)){
            return true;
        }
        //$billId = $data['billId'];
        $jd_service = new jdService();
        $Redis = $jd_service->getRedis();
        if($data['statusId'] == 32000){
            $Redis->lpush('jdprintorder',json_encode($datas));
            echo '{"code":"0","msg":"success","data":""}';

        }elseif ($data['statusId'] == 20020 || $data['statusId'] ==20040){
            //var_dump($data);
            $Redis->lpush('jdcancelorder',json_encode($datas));
            echo '{"code":"0","msg":"success","data":""}';
        }else{
           // $Redis->lpush('jdconfirmedorder',json_encode($data));
            echo '{"code":"0","msg":"success","data":""}';
        }
    }
}